package cn.bocweb.spinning.view.forun;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * Created by chenchangxing on 16/3/14.
 */
public class MainForunAdapter extends FragmentPagerAdapter {

    public MainForunAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0: {
                return new ForunSpecialFragment(1);
            }
            case 1: {
                return new ForunSpecialFragment(2);
            }
            case 2: {
                return new ForunSocialFragment();
            }
            default: {
                return null;
            }
        }
    }

    @Override
    public int getCount() {
        return 3;
    }
}
